]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
volume: Cancel before checking state
authorFlorian Müllner <fmuellner@gnome.org>
Sat, 28 Mar 2020 02:37:50 +0000 (03:37 +0100)
committerFlorian Müllner <fmuellner@gnome.org>
Sat, 28 Mar 2020 18:03:12 +0000 (19:03 +0100)
Since commit 2894085c45 we omit sound feedback on volume changes
if something is already outputting sound. Unfortunately that
"something" may be our own feedback (from a previous volume
change).

In that case we do not want to omit the new feedback, so instead
cancel the previous one.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1147

js/ui/status/volume.js

index 434dcfbf7f0f79c2ee538f24f90f6faa6b2fa370..e8a787c4de7a52ddc4fd0d549f8afec4a2908812 100644 (file)
@@ -138,11 +138,12 @@ var StreamSlider = class {
     }
 
     _notifyVolumeChange() {
-        if (this._stream.state === Gvc.MixerStreamState.RUNNING)
-            return; // feedback not necessary while playing
-
         if (this._volumeCancellable)
             this._volumeCancellable.cancel();
+        this._volumeCancellable = null;
+
+        if (this._stream.state === Gvc.MixerStreamState.RUNNING)
+            return; // feedback not necessary while playing
 
         this._volumeCancellable = new Gio.Cancellable();
         let player = global.display.get_sound_player();